package April._23.work3;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.Timer;
import java.util.TimerTask;

public class Main {
    public static void main(String[] args) {
        MyTimerTask myTimerTask = null;
        try {
            myTimerTask = new MyTimerTask(new FileOutputStream("fileTest\\a.txt"));
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
        Timer timer = new Timer();
        timer.schedule(myTimerTask, 3000, 5000);
    }
}

